home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / var / lib / dpkg / info / libwrap0.postinst < prev    next >
Encoding:
Text File  |  2010-05-23  |  1.9 KB  |  68 lines

  1. #!/bin/sh -e
  2.  
  3. create_hosts_files() {
  4.   if [ ! -e /etc/hosts.allow ]; then
  5.     cat > /etc/hosts.allow <<EOF
  6. # /etc/hosts.allow: list of hosts that are allowed to access the system.
  7. #                   See the manual pages hosts_access(5) and hosts_options(5).
  8. #
  9. # Example:    ALL: LOCAL @some_netgroup
  10. #             ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
  11. #
  12. # If you're going to protect the portmapper use the name "portmap" for the
  13. # daemon name. Remember that you can only use the keyword "ALL" and IP
  14. # addresses (NOT host or domain names) for the portmapper, as well as for
  15. # rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
  16. # for further information.
  17. #
  18.  
  19. EOF
  20.   fi
  21.  
  22.   if [ ! -e /etc/hosts.deny ]; then
  23.     cat > /etc/hosts.deny <<EOF
  24. # /etc/hosts.deny: list of hosts that are _not_ allowed to access the system.
  25. #                  See the manual pages hosts_access(5) and hosts_options(5).
  26. #
  27. # Example:    ALL: some.host.name, .some.domain
  28. #             ALL EXCEPT in.fingerd: other.host.name, .other.domain
  29. #
  30. # If you're going to protect the portmapper use the name "portmap" for the
  31. # daemon name. Remember that you can only use the keyword "ALL" and IP
  32. # addresses (NOT host or domain names) for the portmapper, as well as for
  33. # rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
  34. # for further information.
  35. #
  36. # The PARANOID wildcard matches any host whose name does not match its
  37. # address.
  38. #
  39. # You may wish to enable this to ensure any programs that don't
  40. # validate looked up hostnames still leave understandable logs. In past
  41. # versions of Debian this has been the default.
  42. # ALL: PARANOID
  43.  
  44. EOF
  45.   fi
  46. }
  47.  
  48. case "$1" in
  49.     configure)
  50.     create_hosts_files
  51.     ;;
  52.  
  53.     abort-upgrade|abort-remove|abort-deconfigure)
  54.     ;;
  55.  
  56.     *)
  57.     echo "postinst called with unknown argument '$1'" >&2
  58.     exit 1
  59.     ;;
  60. esac
  61.  
  62. # Automatically added by dh_makeshlibs
  63. if [ "$1" = "configure" ]; then
  64.     ldconfig
  65. fi
  66. # End automatically added section
  67.  
  68.